home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / graphics / gnuplot / term / aed.trm < prev    next >
Text File  |  1993-09-15  |  2KB  |  123 lines

  1. /*
  2.  * $Id: aed.trm%v 3.50 1993/07/09 05:35:24 woo Exp $
  3.  *
  4.  */
  5.  
  6. /* GNUPLOT - aed.trm */
  7. /*
  8.  * Copyright (C) 1990 - 1993
  9.  *
  10.  * Permission to use, copy, and distribute this software and its
  11.  * documentation for any purpose with or without fee is hereby granted, 
  12.  * provided that the above copyright notice appear in all copies and 
  13.  * that both that copyright notice and this permission notice appear 
  14.  * in supporting documentation.
  15.  *
  16.  * Permission to modify the software is granted, but not the right to
  17.  * distribute the modified code.  Modifications are to be distributed 
  18.  * as patches to released version.
  19.  *  
  20.  * This software  is provided "as is" without express or implied warranty.
  21.  * 
  22.  * This file is included by ../term.c.
  23.  *
  24.  * This terminal driver supports:
  25.  *   AED terminals
  26.  *
  27.  * AUTHORS
  28.  *     Colin Kelley, Thomas Williams, Russell Lang
  29.  *
  30.  * send your comments or suggestions to (info-gnuplot@dartmouth.edu).
  31.  * 
  32.  */
  33.  
  34. #define AED_XMAX 768
  35. #define AED_YMAX 575
  36.  
  37. #define AED_XLAST (AED_XMAX - 1)
  38. #define AED_YLAST (AED_YMAX - 1)
  39.  
  40. #define AED_VCHAR    13
  41. #define AED_HCHAR    8
  42. #define AED_VTIC    8
  43. #define AED_HTIC    7
  44.  
  45. /* slightly different for AED 512 */
  46. #define AED5_XMAX 512
  47. #define AED5_XLAST (AED5_XMAX - 1)
  48.  
  49. AED_init()
  50. {
  51.     fprintf(outfile,
  52.     "\033SEN3DDDN.SEC.7.SCT.0.1.80.80.90.SBC.0.AAV2.MOV.0.9.CHR.0.FFD");
  53. /*   2            3     4                5     7    6       1
  54.     1. Clear Screen
  55.     2. Set Encoding
  56.     3. Set Default Color
  57.     4. Set Backround Color Table Entry
  58.     5. Set Backround Color
  59.     6. Move to Bottom Lefthand Corner
  60.     7. Anti-Alias Vectors
  61. */
  62. }
  63.  
  64.  
  65. AED_graphics()
  66. {
  67.     fprintf(outfile,"\033FFD\033");
  68. }
  69.  
  70.  
  71. AED_text()
  72. {
  73.     fprintf(outfile,"\033MOV.0.9.SEC.7.XXX");
  74. }
  75.  
  76.  
  77.  
  78. AED_linetype(linetype)
  79. int linetype;
  80. {
  81. static int color[2+9] = { 7, 1, 6, 2, 3, 5, 1, 6, 2, 3, 5 };
  82. static int type[2+9] = { 85, 85, 255, 255, 255, 255, 255, 85, 85, 85, 85 };
  83.  
  84.     if (linetype >= 10)
  85.         linetype %= 10;
  86.     fprintf(outfile,"\033SLS%d.255.",type[linetype+2]);
  87.     fprintf(outfile,"\033SEC%d.",color[linetype+2]);
  88. }
  89.  
  90.  
  91.  
  92. AED_move(x,y)
  93. int x,y;
  94. {
  95.     fprintf(outfile,"\033MOV%d.%d.",x,y);
  96. }
  97.  
  98.  
  99. AED_vector(x,y)
  100. int x,y;
  101. {
  102.     fprintf(outfile,"\033DVA%d.%d.",x,y);
  103. }
  104.  
  105.  
  106. AED_put_text(x,y,str)
  107. int x,y;
  108. char str[];
  109. {
  110.     AED_move(x,y - AED_VCHAR/2 + 2);
  111.     fprintf(outfile,"\033XXX%s\033",str);
  112. }
  113.  
  114.  
  115. #define hxt (AED_HTIC/2)
  116. #define hyt (AED_VTIC/2)
  117.  
  118. AED_reset()
  119. {
  120.     fprintf(outfile,"\033SCT0.1.0.0.0.SBC.0.FFD");
  121. }
  122.  
  123.